<template>
	<view>
		<u-navbar :title="title" :autoBack="true" :placeholder="true" bgColor="rgba(255,255,255,0)"></u-navbar>
		<view class="cont" v-html="content"></view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				title:'',
				content:''
			}
		},
		onLoad(e) {
			if(e.name == 'require_agreement'){
				this.title = '探店协议'
			}
			if(e.name == 'rental_agreement'){
				this.title = '探店协议'
			}
			if(e.name == 'registrer_agreement'){
				this.title = '服务协议'
			}
			if(e.name == 'privacy_agreement'){
				this.title = '隐私协议'
			}
			if(e.name == 'shop_agreement'){
				this.title = '商家协议'
			}
			this.postagreement(e.name)
		},
		methods:{
			postagreement(name){
				let params = {
					name:name
				}
				this.$Request({
					method: 'POST',
					url: '/api/index/getConfig',
					data: params,
					ismsg: false,
				}).then(res => {
					console.log(res)
					if(res.code == 1){
						this.content = res.data
					} 
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.cont{
		padding: 30rpx;
	}
</style>